package edu.mtu.citizenscience.mushroommapper;

import com.openswimsoftware.orm.ORM;

import edu.mtu.citizenscience.cs.sdk.ServerRequest;
import edu.mtu.citizenscience.cs.sdk.uploader.CitsciUploader;
import edu.mtu.citizenscience.cs.utils.gps.CitsciGPS;
import android.app.Application;
/**
 * @author Corbin Uselton <corbinu@cwuselto@mtu.edu>
 * @copyright (c) 2012 MichiganTech <http://www.mtu.edu>
 * @since 1.0
 * 
 * Mushroom Mapper application class which configures
 * ORM, ServerSDK, and starts services
 */
public class MMApp extends Application {
	
	/**
	 * On application creation setup dependent libraries and services
	 * 
	 * @param void
	 * @return void - no return
	 */
	@Override
	public void onCreate()
    {
        super.onCreate();
        
        // Configure CitsciORM with the class to create the models, the DB name and DB version
        ORM.configureORM("edu.mtu.citizenscience.mushroommapper.model.ModelsCreate", "mushroom", 1);
        // Configure the server SDK that this upload is the mushroom app and the corresponding API key
        ServerRequest.configureServer("mushroom", "nxVMpTGdB7C9SmaaAj7AObjhrYz5gCPucX08uoYivtRBRB6jsHjNr9wPcayO82701734400");
        
        // Create the CitsciUploader service
        CitsciUploader.create(this);
        // Create the CitsciGPS service
        CitsciGPS.create(this);
    }
	
}